Raster to vector conversion of a digital image

ABSTRACT

A raster to vector conversion method of an initial digital image including a pixel matrix, includes generating a digital image divided into polygons by dividing the initial digital image into a plurality of base triangles and defining similarity criteria depending on at least one parameter. The conversion method also includes an iterative operation to process the digital image divided into polygons, selecting pairs of polygons adjacent to each other and to satisfy the similarity criteria and merging together the selected polygons.

RELATED APPLICATION

The present application claims priority of Italian Patent ApplicationNo. RM2004A000562 filed Nov. 12, 2004, which is incorporated in itsentirety herein by this reference.

FIELD OF THE INVENTION

The present invention relates to the technical field of digital imageprocessing and, in particular, to a raster to vector conversion methodof a digital image.

BACKGROUND OF THE INVENTION

Digital images are currently used in many applications, for example innew generation acquisition devices such as digital cameras or DSC(Digital Still Cameras). Furthermore, digital images are becoming moreand more widely used in portable multimedia communication terminals.

Typically, a digital image is represented by a pixel matrix. The totalnumber of pixels present in said matrix defines the spatial resolutionof the image. Each pixel is identified by a pair of spatial coordinatesthat correspond to the position of the pixel inside the matrix and byone or more digital values associated to it, each of which represents aparameter of the pixel.

For example, three digital values are associated with each pixel in anRGB format color digital image, representative of the followingparameters respectively: intensity of the red color component, intensityof the green color component and intensity of the blue color component.

In various applications, representation of a digital image as a pixelmatrix is not optimal because, for example, storage of the pixel matrixcan require a large quantity of memory. Moreover, a digital imagerepresented by a pixel matrix cannot be enlarged at will without thisleading to a considerable loss in quality of the enlarged image.

For this reason, a different form of representation is sometimes used,for example a representation known in the art as vector representation(or vector format).

Essentially, in a vector format, the image is represented as a pluralityof non-overlapping regions or areas, also called primitives, whichaltogether cover the entire image. The information necessary to definethe contours of said regions are stored, while the information regardingthe pixel parameters comprised in each region are summarized in a fewparameters generically associated with the entire region or onlyassociated with a limited number of pixels in the region. It can be seenfrom the above that transformation of a digital image originallyrepresented by a pixel matrix to a corresponding image represented by avector format leads to a reduction in the information contained in theinitial image and, therefore, to its approximation. The quantity ofmemory required for storage of the image is therefore reduced comparedto the memory required for an image represented as a pixel matrix.

It has been observed, furthermore, that in particular applications, suchas enlarging techniques and processing techniques in general thatrequire an increase/decrease (i.e. resizing) in the spatial resolutionof the image, vector representation is more convenient and efficientthan pixel matrix representation.

A class of methods belonging to the state of the art to obtain a vectorrepresentation (or raster to vector conversion) starting from a digitalimage formed by a pixel matrix, provides for the use of triangulation,i.e. dividing into triangular areas of the initial image.

For example, triangulation techniques are known that operate byexploiting the information contained in the image (represented by thedigital values associated to the parameters of the image pixels) andtechniques where said type of information is not taken intoconsideration. These techniques are commonly indicated as “datadependent triangulation techniques” and “data independent triangulationtechniques”.

For example, a data dependent triangulation technique is described inthe publication “Data dependent triangulations for piecewise linearinterpolation” by N. Dyn, D. Levin and S. Rippa, IMA Journal ofNumerical Analysis, vol. 10, pp. 137-154, January 1990.

A data independent triangulation technique has been known since 1934named “Delaunay triangulation”.

It has been observed how numerous raster to vector conversion methodsbelonging to the state of the art, even if widely used, do not guaranteesatisfactory performance in terms of the dimensions occupied by thevectorized images and in terms of the measured or perceived quality ofsaid images.

SUMMARY OF THE INVENTION

According to the present invention, a raster to vector conversion methodis provided without the above-described disadvantages of the methodsknown in the art.

A raster to vector conversion method of an initial digital imageincluding a pixel matrix, includes generating a digital image dividedinto polygons by dividing the initial digital image into a plurality ofbase triangles and defining similarity criteria depending on at leastone parameter. The conversion method also includes an iterativeoperation to process the digital image divided into polygons, selectingpairs of polygons adjacent to each other and to satisfy the similaritycriteria and merging together the selected polygons.

A computer product to execute the raster to vector conversion of adigital image can be directly loaded into an internal memory of acomputer, including portions of code to perform the operations describedabove.

BRIEF DESCRIPTION OF THE DRAWINGS

Further features and advantages of the present invention will becomemore apparent from the following detailed description of a preferred butnon-limiting embodiment thereof, as illustrated in the accompanyingdrawings, wherein:

FIG. 1 shows a simplified block diagram of a raster to vector conversionmethod according to the invention;

FIG. 2 shows a schematic example of a possible division into trianglesof a digital image;

FIG. 3 schematically shows an enlarged portion of the digital image inFIG. 2;

FIG. 4 shows a first example of division into polygons of the digitalimage in FIG. 2;

FIG. 5 shows a second example of division into polygons of the digitalimage in FIG. 2;

FIG. 6 shows an example of a non-simplified polygon;

FIG. 7 shows a polygon obtained by simplification of the polygon in FIG.6; and

FIG. 8 schematically shows a flow diagram comprising a succession ofprocessing operations included in a raster to vector conversion methodaccording to the present invention.

In the figures, equal or similar elements are referred to with the samereference symbols.

DETAILED DESCRIPTION

FIG. 1 schematically represents a block diagram of a raster to vectorconversion method M_Pol according to an embodiment of the invention.

The raster to vector conversion method M_Pol processes an initialdigital image to produce an output digital image in a vector format.

The raster to vector conversion method M_Pol can, for example, becarried out inside the same device used to acquire the initial digitalimage. The image acquisition means and the processing and storage meansnecessary to carry out said method inside an acquisition device areknown to those skilled in the art and, therefore, are not described infurther detail.

Alternatively, the raster to vector conversion method can be carried outby means of a personal computer or other similar processing means but inany case different from the image acquisition device. In this case, theinitial digital image can be transferred from the acquisition device tobe stored in suitable memory resources of the computer, and thenprocessed by means of a program or computer product, including codeinstructions which, if loaded and executed inside the personal computer,process said image according to the raster to vector conversion methodschematically represented in FIG. 1.

As shown in FIG. 1, the raster to vector conversion method M_Pol,preferably comprises the following blocks or modules: a first conversionmodule I_Cnv, a triangulation module I_Div, a polygonization moduleI_Pol, a polygon simplification module I_Sp and an inverse conversionmodule I_Cnv⁻¹.

Img_(RGB) schematically indicates the initial image input to the rasterto vector conversion method M_Pol. The initial image Img_(RGB) isrepresented by means of a pixel matrix. Each pixel is defined by a pairof spatial coordinates, corresponding to the position of the pixelinside the matrix, and by one or more digital values associated to it,each of which represents an intensity parameter of the pixel.

Preferably, the initial digital image Img_(RGB) is a color digital imagein RGB format, where three digital values are associated to each pixel,representing the following parameters respectively: intensity of the redcolor component, intensity of the green color component and intensity ofthe blue color component.

Each digital value is, for example, stored on sixteen or twenty-fourbits.

More preferably, the digital image Img_(RGB) input to the method M_Polis a digital image acquired by means of a CCD type sensor (ChargeCoupled Device), or CMOS (Complementary Metal Oxide Semiconductor),comprising an optical filter CFA (for example, Bayer matrix) latersubjected to a color interpolation step to be transformed into an RGBimage.

With reference to the block diagram of FIG. 1, a conversion blockindicated with I_Cnv converts the initial digital image Img_(RGB) in RGBformat into another digital image Img_(YCR) in YCbCr format(luminance-chrominance format).

In order to perform said conversion, it is possible to use conversionformulae known to the skilled in the art and easily found in literature.The digital image converted into YCbCr format is, therefore, an imagerepresented by means of a pixel matrix where three digital values areassociated with each pixel, representing the following parametersrespectively: luminance intensity, intensity of the blue chrominance andintensity of the red chrominance.

The conversion block I_Cnv is entirely optional and is necessary only ifthe intensity values of the pixels of the digital image in the YCbCRspace rather than in the RGB space are to be represented.

However, if the initial images are color images, the properties of thetwo spaces differ considerably, and representation in the YCbCR space ispreferable for subsequent processing, especially if the images generatedby the M_Pol method are to be seen by human beings.

With gray-scale images however, there exists no difference betweenrepresentation in the two color spaces, the same values in the firstcomponent (Y and G respectively) are present while the remaining twocomponents (Cb and Cr for one, B and R for the other) have null values,given the absence of information on the chrominance. Therefore, in thecase where the method operates with gray-scale initial images, noconversion whatsoever would be necessary.

Returning to the block diagram in FIG. 1, the triangulation block ormodule I_Div provides an input for the digital image Img_(YCR), in thisexample in YCbCR format, processes said image by means of atriangulation step and outputs a digital image Img_(T) divided intotriangles or better divided into polygons exclusively comprisingtriangles (also base triangles).

FIG. 2 schematically represents a particular example of an image Img_(T)divided into a plurality of base triangles T1, . . . , T31. It should beconsidered that the representation in FIG. 2 is only schematic andcorresponds to a very rough example of triangulation. In practice, toobtain good approximation of the digital image, much finer triangulationis required.

The triangulation step carried out by the block I_Div makes it possibleto divide the entire area or plane of the initial image Img_(YCR) into aplurality of non-overlapping triangular areas or regions T1, . . . ,T31. Each of these regions, or base triangles, includes a plurality ofpixels of the initial image Img_(YCR) and is, for example, defined bythe coordinates of the pixels located near the vertices of the triangle.

On the basis of the particular type of triangulation technique used, thebase triangles can satisfy some particular criteria or constraints. Forexample, different types of constraints can be imposed on triangulation,such as: the size of the base triangles, or the shape of said basetriangles, or a constraint establishing that each side of the trianglemust be in common with three distinct respective adjacent triangles.

In an embodiment of the present invention, the triangulation block I_Divperforms a triangulation step according to a technique known in the artas Data Dependent Triangulation (DDT).

More preferably, the triangulation technique used is a data dependenttriangulation of the locally optimal type, i.e. such as to optimize apredetermined cost function.

DDT, unlike traditional triangulation methods (such as theabove-mentioned Delaunay triangulation), productively also exploits theinformation provided by the parameters associated to the pixels of theimage in order to minimize the visual impact of the inevitableapproximation errors. Advantageously, DDT permits limited introductionof smoothing and artifacts especially at high frequencies.

The name “Data Dependent” derives from the fact that the triangulationchoice is carried out in conformity with optimality criteria that dependnot only on the position of the pixels but also on all the informationassociated to the pixels. In fact, said criteria take into account thetri-dimensional geometric properties of the interpolator planes insteadof only the bi-dimensional geometric properties of their projection ontothe image plane.

Different DDT techniques are known, for example described in the article“Data Dependent Triangulations for Piecewise Linear Interpolation”, byN. Dyn, D. Lewin and S. Rippa, IMA Journal of Numerical Analysis, vol.10, pp. 137-154, January 1990 and in the article by X. Yu, B. S. Morseand T. W. Sederberg, “Image Reconstruction Using Data-DependentTriangulation”, IEEE Transactions on Computer Graphics and Applications,pp. 62-68, May/June 2001, where in particular a DDT technique of thelocally optimal type is described.

In an alternative embodiment, triangulation is carried out by means of atechnique different from DDT, known as Wavelet Based Triangulation(WBT), described for example in the doctorate thesis “Wavelet-BasedMulti-resolution Surface Approximation from Height Fields” by S. Lee,Virginia, Polytechnic Institute and State University, Blacksburg,February 2002.

FIG. 3 shows an enlarged portion of the image divided into trianglesImg_(T) schematically illustrated in FIG. 2. In particular, FIG. 3 showsa portion of the image including three base triangles T1, T2 and T3.Each triangle is univocally defined by the pixels located near thevertices. For example, triangle T1 is defined by the three pixelslocated near its vertices v1, v3, v4. In the example in FIG. 3, triangleT1 is adjacent to triangle T3, with which it has in common the sidev4-v5, and it is adjacent to triangle T2. More in detail, a side v1-v5of triangle T1 corresponds to a portion of the side v1-v3 of triangleT2.

In an embodiment of the present invention, independently of theparticular triangulation technique used, the image Img_(T) divided intotriangles (i.e. divided into polygons exclusively comprising triangles),output by the division step I_Div, is represented by means of suitabledata structures that make it possible to store, for each triangle, thepositions of the pixels located near its vertices and respective digitalintensity values (luminance Y and chrominance Cb, Cr).

In other words, the digital image Img_(T) output by the dividing stepI_Div has a vector representation whose primitives are exclusivelytriangles.

Advantageously, this choice makes it possible for the subsequentprocessing steps to operate on a smaller quantity of data compared tothe quantity of data necessary to represent the initial image.

Returning to the block diagram in FIG. 1, a subsequent module I_Polproduces, starting from the image Img_(T) divided into base triangles,an image Img_(P) divided into polygons originating from the merging ofsaid base triangles and possibly further comprising a residual subset ofsaid base triangles.

Hereinafter, the expression “compound polygon” shall indicate a polygonderiving from the merging of at least two base triangles and which,therefore, comprises at least two base triangles (components).Furthermore, also a polygon obtained following the merging of a compoundpolygon with a base triangle or with another compound polygon is still acompound polygon. It should also be noted that a compound polygonderiving from the merging of two or more base triangles can still be atriangle but it cannot be defined as a base triangle.

In an embodiment of the present invention, the processing step carriedout in the module I_Pol is iterative, i.e. it comprises severalconsecutive processing steps.

For example, at the end of a first iterative step starting from theimage Img_(T) divided into base triangles (or divided into polygonsexclusively comprising base triangles), an image Img_(PL1) is formeddivided into first polygons comprising:

-   -   polygons originating from the merging of pairs of adjacent base        triangles (i.e. compound polygons); and possibly    -   a residual subset of said base triangles.

For the purposes of this description, a pair of adjacent triangles or,more in general, of adjacent polygons, is a pair of geometricalnon-overlapping shapes, having one side in common or such that one sideof one geometrical figure intersects at more than one point with oneside of the other geometrical figure.

At the end of the second iterative step, subsequent to said first step,starting from the image Img_(PL1) formed at the end of the first step, anew image Img_(PL2) is formed divided into second polygons comprising:

-   -   polygons originating from the merging of pairs of first adjacent        polygons; and possibly comprising    -   a residual subset of said first polygons.

In a subsequent iterative step, the second adjacent polygons can also bemerged together and so on. The procedure for any subsequent iterativesteps is the same as the two above-described iterative steps.

FIG. 4 shows a possible example of a digital image Img_(PL1) obtainedfrom the digital image in FIG. 2 at the end of the first iterative step.The digital image in FIG. 4 comprises first polygons of the type:

-   -   polygons P1, . . . ,P8 (compound polygons) originating from the        merging of pairs of adjacent base triangles; and possibly    -   a residual subset of said base triangles (e.g. T3, T4, T8, . . .        ).

For example, the compound polygon P1 originated from the merging of thebase triangle T1 with the base triangle T2.

FIG. 5 shows a possible example of a digital image Img_(PL2) obtainedfrom the digital image in FIG. 4 at the end of the second iterativestep. The digital image in FIG. 5 comprises second polygons of the type:

-   -   polygons P9, . . . , P12 originating from the merging of pairs        of adjacent first polygons; and    -   a residual subset of said first polygons (e.g. T4, T8, T12, P5).

For example, the polygon P9 originated from the merging of the compoundpolygon P1 and the base triangle T3. Therefore, the polygon P9 includesthe following components: T1, T2, T3.

However, the compound polygon P10 is obtained from the merging of thecompound polygons P3 and P4 (therefore including components T5, T6, T7,T9).

Advantageously, merging between two geometric figures (i.e. between twobase triangles, between a base triangle and a compound polygon, betweentwo compound polygons) is carried out once a similarity test has beenpassed. The similarity test can be considered passed if the twogeometric figures satisfy a predetermined criterion or similaritypredicate.

In an embodiment of the present invention, the predetermined similaritycriterion can be modified between one iteration and the next, so that asimilarity requirement coupled to said criterion can be slackened (orrelaxed, in other words, made less demanding) between one iteration andthe iteration immediately following. More preferably, said similaritycriterion depends on at least one input parameter that can be modifiedbetween one iteration and the next.

In a first embodiment (which is called “comparison mode based ontriangles”), in order to evaluate the similarity between a first and asecond geometric figure, the similarity between two adjacent basetriangles comprised in said geometric figures is evaluated. In otherwords:

-   -   if the two geometric figures are base triangles, the similarity        is simply evaluated between said base triangles;    -   if the first geometric figure is a base triangle and the second        a compound polygon, the similarity is evaluated between said        base triangle and a further base triangle adjacent to it and        comprised in the compound polygon;    -   if the two geometric figures are compound polygons, the        similarity is evaluated between two adjacent base triangles        belonging to the first and second compound polygons        respectively.

In an alternative embodiment (which is called “comparison mode based onpolygons”), the similarity between two geometric figures is evaluated bycomparing said geometric figures taken as a whole, independently ofwhether they are base triangles or compound polygons.

Furthermore, in an embodiment of the present invention, the similaritycriterion evaluates the presence or absence of similarity between pairsof geometric figures (i.e. between two base triangles, between a basetriangle and a compound triangle, between two compound triangles) basedon a comparison between the digital values associated to some or all ofthe pixels of the image located near the vertices of the geometricalfigure whose similarity is to be evaluated. For the purposes of thisdescription, vertices of a compound polygon means the set of vertices ofall the base triangles comprised in the compound polygon.

In an embodiment of the present invention, in order to evaluate thesimilarity of a compound polygon with another geometric figure, fromsaid compound polygon (i.e. including several base triangles, obtainedfrom the merging, even in several steps, of two or more base triangles)both the digital values of the vertices belonging to the externalperimeter (external vertices) of the compound polygon and the digitalvalues of the vertices of the base triangles included in said compoundpolygon, not necessarily external vertices of said compound polygon, canbe taken into consideration.

In the case of a gray-scale image, a single digital value representativeof the intensity parameter “gray level” are associated with each pixel(vertex). In this case, the similarity criterion is able to evaluate theabsence or presence of similarity between two geometrical figures on thebasis of a comparison between the levels of gray associated to thepixels of the image located near the vertices (internal or external) ofsaid geometric figures. On the other hand, in the case of a color image,for example in YCbCR format, three digital values representing intensityparameters “luminance”, “blue chrominance” and “red chrominance” arerespectively associated with each pixel (vertex). In this case, thesimilarity criterion is able to evaluate the absence or presence ofsimilarity between two geometric figures on the basis of separatecomparisons between the different intensity parameters associated to theimage pixels located near the vertices (internal or external) of saidgeometric figures.

Preferably, the evaluation of the similarity between a first and asecond geometric figure comprises the following steps:

-   -   assignment of an intensity measurement (scalar or vector) to        each of said figures, calculated on the basis of digital values        associated to the respective vertices of said figures;    -   evaluation of the absolute or relative difference (scalar or        vector) between the intensity measurement (scalar or vector)        assigned to the first geometric figure and the intensity        measurement (scalar or vector) assigned to the second geometric        figure;    -   verification whether or not said difference meets the        predetermined similarity criterion.

More preferably, in the case where the geometric figure is a basetriangle, an intensity measurement (scalar or vector) is assigned tosaid figure, obtained by calculating the average (scalar or vector) ofthe digital values associated to the pixels corresponding to thevertices of the base triangle. For example, in the case of amonochromatic image, for example gray-level, the result of said averageis a digital value corresponding to the arithmetic mean of the threedigital values (gray levels) associated to the three vertices of thebase triangle respectively. However, in the case of a color image, saidaverage is a vector comprising three digital values each of which isobtained from an average of three digital values representative of onesingle intensity parameter.

In the case of a compound polygon, however, said measurement can beassigned:

-   -   in the case of merging based on base triangles, selecting a base        triangle included in the polygon and assigning to said base        triangle an intensity measurement calculated as described above        for a base triangle;    -   in the case of merging based on polygons, by selecting the        vertices of the compound polygon belonging to the external        perimeter (external vertices) and using the digital values        associated to them in order to calculate the arithmetic mean        (scalar or vector); or by selecting all the vertices (internal        and external) of the compound polygon and using the digital        values associated to them in order to calculate the arithmetic        mean (scalar or vector).

More preferably, but non-limiting, in the case where the intensitymeasurement is obtained as an average of the digital values associatedto all the vertices (internal and external) of the compound polygon,said average is a weighted arithmetic mean where the external vertices(or rather, the digital values associated to them) are weighteddifferently from the internal vertices.

It was observed that the best results are obtained by:

-   -   assigning a greater weight to the external vertices if these are        more numerous than the internal vertices in the compound        polygon;    -   assigning a greater weight to the internal vertices if these are        more numerous than the external vertices in the compound        polygon.

Once an intensity measurement (scalar or vector) has been assigned tothe two geometric figures, the similarity between the two figures isevaluated by comparing said measurements and, in particular, thepresence of similarity is established by evaluating if an absolute orrelative difference (scalar or vector) between said measurements (or anyother measurement proportional to said difference) is lower than apredetermined maximum value.

In an embodiment of the present invention, in the case of a color image,for example in YCbCR format, once a vector intensity measurementM1=(M1_(Y), M1_(Cb), M1_(Cr)) has been assigned to the first figure (forexample, a first base triangle), and once a vector intensity measurementM2=(M2_(Y), M2_(Cb), M2_(Cr)) has been assigned to the second figure(for example, a second base triangle), the similarity between saidfigures can be affirmed if these three conditions are met:|M1_(Y) −M2_(Y)|≦τ_(Y)(i)*max_Δ_(Y);|M1_(Cb) −M2_(Cb)|≦τ_(Cb)(i)*max_Δ_(Cb);|M1_(Cr) −M2_(Cr)|≦τ_(Cr)(i)*max_Δ_(Cr);where:

-   -   M1_(Y) is a digital value that represents an intensity        measurement of the parameter Y of the first base triangle, i.e.        of its luminance, calculated for example as the arithmetic mean        of the three digital luminance values associated respectively to        the three pixels located near the vertices of the first base        triangle;    -   M1_(Cb) is a digital value that represents an intensity        measurement of the parameter Cb of the first base triangle, i.e.        of its blue chrominance, calculated for example as the        arithmetic mean of the three digital blue chrominance values        associated respectively to the three pixels located near the        vertices of the first base triangle;    -   M1_(Cr) is a digital value that represents an intensity value of        the parameter Cr of the first base triangle, i.e. of its red        chrominance, calculated for example as the arithmetic mean of        the three digital red chrominance values associated respectively        to the three pixels located near the vertices of the first base        triangle;        where M2_(Y), M2_(Cb), M2_(Cr) are three digital values        representing an intensity measurement of the parameter Y, of the        parameter Cb and of the parameter Cr respectively of the second        triangle (calculated in the same way as described above for the        digital values M1_(Y), M1_(Cb), M1_(Cr))    -   τ_(Y)(i), τ_(Cb)(i), τ_(Cr)(i), represent at iteration (i),        differential percentage values, or thresholds, for the        components Y, Cb and Cr and represent input parameters for the        similarity criterion;    -   max_Δ_(Y), max_Δ_(Cb), max_Δ_(Cr), represent maximum difference        digital values to be found on components Y, Cb and Cr        respectively. For example, if the intensity digital values for        the three components are represented by eight bits, the result        is:        max_≢_(Y)=max_Δ_(Cb)=max_Δ_(Cr)=255.

The above-described similarity criterion is a criterion based onseparate evaluations for the three components of the respective absolutedifferential percentages between the first and the second geometricfigure, in short an Absolute Difference Separated Ratio (ADSR)similarity criterion.

Advantageously, by choosing different input parameter values τ_(Y)(i),τ_(Cb)(i), τ_(Cr)(i), or thresholds, it is possible to evaluate thesimilarity of the two figures by using different similarity criteria forthe different intensity components of the image, so that a greaterdegree of similarity is required for the image component that is moreimportant from a perceptive point of view, which in this example is thecomponent Y. For example, it can be said τ_(Y)(i)≦τ_(Cb)(i)=τ_(Cr)(i).

Furthermore, in a preferred embodiment, said thresholds (or inputparameters) can be modified between one iteration step (step i) and thenext (stepi+1), for example so that:τ_(Y)(i+1)=τ_(Y)(i)+τ_(step);τ_(Cb)(i+1)=τ_(Cb)(i)+τ_(step);τ_(Cr)(i+1)=τ_(Cr)(i)+τ_(step);where τ_(step) is a positive value and represents a thresholdincremental step. Alternatively, it is also possible to provide fordifferent increments for the different components Y, Cb, Cr.

In an embodiment of the present invention, the incremental stepτ_(step), can be varied between the different iterations, to ensuresmall threshold increments for the first iterations and greaterthreshold increments for subsequent iterations.

In an embodiment of the present invention, the polygonization step I_Polterminates at iteration x where at least one of the input parameters ofthe similarity criterion satisfies a predetermined terminationcondition.

For example, in the case where the similarity criterion is ADSR, thetermination condition is expressed by:τ_(Y)(x)≧τ_(max)where τ_(max) is a predetermined threshold value, which represents themaximum threshold used for the luminance component. By varying theparameter τ_(max) of the similarity criterion, it is possible to selectthe final degree of approximation desired for the polygonized imageImg_(P).

In accordance with the diagram shown in FIG. 1, the polygonized imageImg_(P) of the block I_Pol, is then sent to the input of block I_Smp,suitable to carry out a simplification step of the compound polygonscomprised in said image and output a simplified polygonized andvectorized image Img_(Vet).

With reference to FIG. 6, it should be noted that a compound polygon 60obtained from the merging of several base triangles 61, 62, 63, 64includes vertices Vp that are proper vertices of the polygon but it canalso include improper vertices Vi (points on the external perimeter ofthe polygon that are points where a pair of external sides of thepolygon intersect). The polygon simplification step carried out in theblock I_Smp makes it possible to eliminate the “superfluous” verticesVi, so as to reduce the number of polygon vertices to the minimumindispensable. FIG. 7 shows the polygon 60 in FIG. 6 after thesimplification operation.

Inside said block I_Smp, once the simplification step has been carriedout, a step to map the simplified polygons can be provided in order toobtain a vector representation image Img_(Vet).

Finally, returning to the diagram in FIG. 1, a further block ispreferably provided in order to reconvert the vector converted imageImg_(Vet) with polygon intensity parameters in format Y, Cb, CR, into avector converted image Img_(DEF) with polygon intensity parameters informat R, G, B. This conversion of intensity parameters can be carriedout using conversion formulae already known in the art and, therefore,is not further described herein.

FIG. 8 schematically shows a flow diagram where some steps or operationsof the raster to vector conversion method M_Pol are illustrated. Withreference to said flow diagram, which in some aspects is simplifiedcompared to the diagram in FIG. 1 while in other aspects it is even moredetailed, an example of the functioning of the raster to vectorconversion method M_Pol is briefly explained.

For reasons of simplicity and clarity, a non-limiting hypothesis is madewhere the initial image Img_(YCR), comprising a pixel matrix, is alreadyin YCbCr format and is such that Cr=0 and Cb=0 for all the pixels. Inpractice, the initial image is a gray-scale image.

By means of the operation I_Div, by dividing the initial digital imageinto a plurality of base triangles (T1, . . . , T31), a digital image isformed divided into polygons Img_(T) (polygons which, therefore,exclusively comprise triangles).

Once the similarity criterion has been defined (whose “strength” or“weakness” can be varied, or rather adjusted, by means of at least oneinput parameter τ_(Y)) in the operation C_Sel, said input parameterτ_(Y) is set (or initialized) to an initial value τ_(Ystart).Preferably, the similarity criterion is an ADSR similarity criterion andthe input parameter τ_(Y) represents, in this particular case, anacceptable maximum absolute difference percentage between the luminanceintensities of two polygons for these to be judged similar.

After the initialization step C_Sel, an iterative step (I_Pol) startswhich processes the image divided into polygons (which initially areonly base triangles), carrying out the following operations:

-   -   Selecting P_Sel at least a first and a second polygon adjacent        to each other that satisfy said similarity criterion;    -   merging P_Merge the first and the second selected polygons in        order to generate a new digital image divided into polygons and        comprising at least one new polygon formed by the merging of        said first and second selected polygons.

At the end of the merging operation, a step T_Upd updates the inputparameter τ_(Y), for example by increasing it by a predeterminedquantity τ_(step).

A subsequent step End_Det checks if a termination condition of theiterative part I_Pol of the processing operation has been met (e.g. theupdated input parameter is compared to a predetermined maximum value).If the termination condition is satisfied (in figure, arrow Y), theiterative step terminates and a subsequent step I_Smp forsimplification, of the polygons is carried out.

If the termination condition is not satisfied (in figure, arrow Y), theiterative step I_Pol is repeatedly carried out until the predeterminedtermination condition is reached.

Experimental tests performed on a high number of image samples, both ofthe photographic type and containing text, have demonstrated that theraster to vector conversion method according to the invention, ifcompared to the raster to vector conversion methods belonging to thestate of the art (also software currently available on the market), canprovide better performance both in terms of perceived quality and interms of measured quality.

Naturally, in order to satisfy contingent and specific requirements, aperson skilled in the art may apply to the above-described raster tovector conversion method according to the invention many modificationsand variations, all of which, however, are included within the scope ofprotection of the invention as defined by the following claims.

1. A computer-implemented, raster to vector conversion method of aninitial digital image comprising a pixel matrix, the method comprising:using a computer to perform the following steps: generating a digitalimage divided into polygons by dividing the initial digital image into aplurality of base triangles; defining a similarity criterion dependingon at least one parameter; storing in memory said similarity criterionand said at least one parameter; and performing an iterative operationcomprising: selecting at least a first polygon and a second polygonadjacent to each other and which satisfy said similarity criterion;merging said first polygon with said second polygon in order to generatea new digital image divided into polygons and comprising at least onenew A polygon formed by the merging of said at least first polygon andsecond polygon; and updating in memory said at least one parameter ofthe similarity criterion, wherein the digital image divided intopolygons is said new generated image and wherein the similaritycriterion depends on the modified parameter.
 2. The computer-implementedraster to vector conversion method according to claim 1 furthercomprising determining if a predetermined termination condition of saiditerative operation has been satisfied.
 3. The computer-implementedraster to vector conversion method according to claim 1, wherein saidgenerating is performed in accordance with a data dependenttriangulation technique of the locally optimal type.
 4. Thecomputer-implemented raster to vector conversion method according toclaim 1 wherein said generating is performed in accordance with atriangulation technique based on wavelets.
 5. The computer-implementedraster to vector conversion method according to claim 1, wherein: saidfirst polygon comprises a compound polygon including at least a firstand a second base triangle; said second polygon comprises a further basetriangle adjacent to said first base triangle; and said selecting checksif said similarity criterion is satisfied by comparing said first andsaid further base triangle.
 6. The computer-implemented raster to vectorconversion method according to claim 1, wherein said similaritycriterion is coupled to a similarity requirement that is made lessdemanding between two successive iterations of said operation to updatesaid at least one parameter.
 7. The computer-implemented raster tovector conversion method according to claim 1, wherein said similaritycriterion evaluates the presence or absence of a similarity propertybetween said first polygon and said second polygon on the basis of acomparison of the digital values associated to at least some of thepixels of the initial image located near the vertices of said first andsaid second polygon.
 8. The computer-implemented raster to vectorconversion method according to claim 7, wherein said vertices comprisethe vertices of the external perimeter of said polygons.
 9. Thecomputer-implemented raster to vector conversion method according toclaim 8, wherein said vertices further comprise the vertices of the basetriangles included in said polygons that do not belong to said externalperimeter.
 10. The computer-implemented raster to vector conversionmethod according to claim 1, wherein said selecting comprises: assigninga respective intensity measurement, scalar or vector, to said first andsaid second polygon, calculated on the basis of digital valuesassociated to the respective vertices of said polygons; evaluating adifference, scalar or vector, absolute or relative, between theintensity measurement assigned to the first polygon and the intensitymeasurement assigned to the second polygon; and verifying whether or notsaid difference satisfies the predetermined similarity criterion. 11.The computer-implemented raster to vector conversion method according toclaim 10, wherein said similarity criterion comprises an ADSR (AbsoluteDifference Separated Ratio) type similarity criterion.
 12. Thecomputer-implemented raster to vector conversion method according toclaim 1 further comprising a simplification operation of the polygons insaid image divided into polygons, in order to eliminate the vertices ofsaid compound polygons that are not proper to said polygons.
 13. Acomputer-readable storage medium tangibly embodying a program ofinstructions executed by a machine, wherein said program of instructionscomprises a plurality of program codes for raster to vector conversionof a digital image, said program of instructions comprising: programcode for generating a digital image divided into polygons by dividingthe initial digital image into a plurality of base triangles; programcode for defining a similarity criterion depending on at least oneparameter; program code for performing an iterative operationcomprising: code for selecting at least a first and a second polygonadjacent to each other and satisfy said similarity criterion; code formerging said first polygon with said second polygon in order to generatea new digital image divided into polygons and comprising at least onenew polygon formed by the merging of said at least first and secondpolygon; and code for updating said at least one parameter of thesimilarity criterion, wherein the digital image divided into polygons issaid new generated image and wherein the similarity criterion depends onthe modified parameter.
 14. The computer-readable storage mediumaccording to claim 13, wherein said program of instructions furthercomprises program code for determining if a predetermined terminationcondition of said iterative operation has been satisfied.
 15. Thecomputer-readable storage medium according to claim 13, wherein saidcode for generating a digital image is performed in accordance with adata dependent triangulation technique of the locally optimal type. 16.The computer-readable storage medium according to claim 13, wherein saidcode for generating a digital image is performed in accordance with atriangulation technique based on wavelets.
 17. The computer-readablestorage medium according to claim 13, wherein: said first polygoncomprises a compound polygon including at least a first and a secondbase triangle; said second polygon comprises a further base triangleadjacent to said first base triangle; and said code for selecting checksif said similarity criterion is satisfied by comparing said first andsaid further base triangle.
 18. The computer-readable storage mediumaccording to claim 13, wherein said similarity criterion is coupled to asimilarity requirement that is made less demanding between twosuccessive iterations of said operation to update said at least oneparameter.
 19. The computer-readable storage medium according to claim13, wherein said similarity criterion evaluates the presence or absenceof a similarity property between said first polygon and said secondpolygon on the basis of a comparison of the digital values associated toat least some of the pixels of the initial image located near thevertices of said first and said second polygon.
 20. Thecomputer-readable storage medium according to claim 19, wherein saidvertices comprise the vertices of the external perimeter of saidpolygons.
 21. The computer-readable storage medium according to claim20, wherein said vertices further comprise the vertices of the basetriangles included in said polygons that do not belong to said externalperimeter.
 22. The computer-readable storage medium according to claim13, wherein said code for selecting comprises: assigning a respectiveintensity measurement, scalar or vector, to said first polygon and saidsecond polygon, calculated on the basis of digital values associated tothe respective vertices of said polygons; evaluating a difference,scalar or vector, absolute or relative between the intensity measurementassigned to the first polygon and the intensity measurement assigned tothe second polygon; and verifying whether or not said differencesatisfies the predetermined similarity criterion.
 23. Thecomputer-readable storage medium according to claim 22, wherein saidsimilarity criterion comprises an ADSR (Absolute Difference SeparatedRatio) type similarity criterion.
 24. The computer-readable storagemedium according to claim 13 further comprising a simplificationoperation of the polygons in said image divided into polygons, in orderto eliminate the vertices of said compound polygons that are not properto said polygons.